﻿@model  List<Client.LF.DA>

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>DAshow</title>
    <link href="~/Content/css/bootstrap.min.css" rel="stylesheet" />
    <script src="~/Scripts/js/jquery.min.js"></script>
    <script src="~/Scripts/js/bootstrap.min.js"></script>
    <script src="~/Scripts/jquery-1.8.2.min.js"></script>
</head>
<body>
    <div><input id="Button1" type="button" value="采集档案" onclick="location.href='/new/DAadd'" />
        <table style="text-align:center; border-collapse:collapse;" border="1" class="table-bordered table table-condensed table-responsive table-hover">
            <thead>
                <tr>
                    <td>员工姓名</td>
                    <td>档案编号</td>
                    <td>档案</td>
                    <td>备注</td>
                    <td>操作</td>
                </tr>
            </thead>
            <tbody>
                @{
                    foreach (var item in Model)
                    {
                        <tr><td>@item.EmployName</td><td>@item.dabh</td><td>@item.dname</td><td>@item.beizhu</td><td><a href="#" onclick="fundel(@item.Did)">删除档案</a>  <a href="/new/DAEXist?did=@item.Did ">修改档案</a></td></tr>
                    }
                }
            </tbody>
        </table> 
    </div>
</body>
</html>
<script>
function fundel(obj)
    {
        $.ajax({
            url: "/new/DAdel",
            data: { Did: obj },
            success:function(obj)
            {
                if(obj>0)
                {
                    alert("删除成功！")
                    location.href='/new/DAshow'
                }
                else
                {
                    alert("删除失败！")
                    location.href = '/new/DAshow'
                }
            }
        })
}
</script>